package com.meichis.yndms.model;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author xmy
 * @title
 * @remake
 * @create 2021-05-28 22:42
 */
public class DataTable implements Serializable {

    private String name;
    private int value;
    private String id;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public DataTable() {
    }

    public DataTable(int value, String name) {
        this.name = name;
        this.value = value;
    }

    public DataTable(String id, String name) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DataTable dataTable = (DataTable) o;
        return
                Objects.equals(id, dataTable.getId())
                        && Objects.equals(name, dataTable.getName());
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name);
    }


}
